﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;

namespace XMK.Framework.Model.Ajax
{
    /// <summary>
    /// Ajax方法交互的映射集合类，用户配置方法别名和实际方面名已经参数类型列表的映射
    /// </summary>
    [XmlRoot("AjaxDataMapping")]
    public class AjaxDataMappingInfo
    {
        /// <summary>
        /// 是否允许直接连接Data
        /// </summary>
        [XmlAttribute("IsCallData")]
        public string IsCallData { get; set; }
        /// <summary>
        /// 调用的data
        /// </summary>
        [XmlElement(ElementName = "DataMapping")]
        public List<DataMappingInfo> DataMappings { get; set; }
    }
    /// <summary>
    /// Ajax方法交互的映射类
    /// </summary>
    [Serializable]
    public class DataMappingInfo
    {
        /// <summary>
        /// 类名
        /// </summary>
        [XmlAttribute("Name")]
        public string Name { get; set; }

        /// <summary>
        /// remoting地址
        /// </summary>
        [XmlAttribute("RemotingUrl")]
        public string RemotingUrl { get; set; }
        
        /// <summary>
        /// AjaxMethodMappingInfo集合
        /// </summary>
        [XmlElement(ElementName = "WsIDMapping")]
        public List<WsIDMappingInfo> WsIDMappings { get; set; }
    }
    /// <summary>
    /// Ajax方法交互的映射类，用户配置方法别名和实际方面名已经参数类型列表的映射
    /// </summary>
    [Serializable]
    public class WsIDMappingInfo
    {
        /// <summary>
        /// 接口id
        /// </summary>
        [XmlAttribute("id")]
        public string id { get; set; }

    }
}